﻿using SqlSugar;
using System;

namespace NP.BPMReportPlatform.Entities.BPM_Engine
{
    /// <summary>
    /// 待办
    /// </summary>
    [SugarTable("Tasks")]
    public class BpmTask
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid TaskId { get; set; }


        public Guid ActivityId { get; set; }

        /// <summary>
        /// 审批步骤名称
        /// </summary>
        public string ActivityName { get; set; }

        /// <summary>
        /// 审批人名称
        /// </summary>
        public string ActivityResolverName { get; set; }

        /// <summary>
        /// 所属系统id
        /// </summary>
        public string SystemId { get; set; }

        /// <summary>
        /// 待办类型（1 待办、2 抄送）
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 流程实例编号
        /// </summary>
        public string InstanceNumber { get; set; }


        /// <summary>
        /// 用户id
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string UserName { get; set; }


        /// <summary>
        /// 发送人id
        /// </summary>
        public Guid SenderId { get; set; }

        /// <summary>
        /// 发送人名称
        /// </summary>
        public string SenderName { get; set; }

        /// <summary>
        /// 发送人组织名称
        /// </summary>
        public string SenderOrganizationName { get; set; }

        /// <summary>
        /// 实际处理人id（默认同步UserId，可传）
        /// </summary>
        public Guid? ResolverId { get; set; }

        /// <summary>
        /// 实际处理人名称（默认同步UserName，可传）
        /// </summary>
        public string ResolverName { get; set; }

        /// <summary>
        /// 状态（-1 作废、1 处理中、2 完成）
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 到达时间（默认创建时间，可传）
        /// </summary>
        public DateTime ArriveTime { get; set; }

        /// <summary>
        /// 完成时间（默认更新时间，可传）
        /// </summary>
        public DateTime? FinishTime { get; set; }

        /// <summary>
        /// 耗时（秒）
        /// </summary>
        public int? ElapsedTime { get; set; }

        /// <summary>
        /// 紧急度
        /// </summary>
        public int Urgency { get; set; }

        /// <summary>
        /// 是否已读
        /// </summary>
        public bool IsRead { get; set; }

    }
}
